package controller

import (
	"github.com/gin-gonic/gin"
	"my-blog/main/dao"
	"net/http"
	"strconv"
)

func ArticleDetailsController(c *gin.Context) {
	id := c.Param("id")
	atoiId, _ := strconv.Atoi(id)
	details, className := dao.GetArticleDetails(dao.Dbdao, atoiId)
	c.HTML(http.StatusOK, "details.html", gin.H{
		"details":   details,
		"className": className,
	})
}
